What is for in spanish?

"for" in Spanish can be translated as "para" or "por" depending on the context.

When used to indicate purpose or intention, it is translated as "para." For example: "I bought this gift for you" would be "Compré este regalo para ti."

When used to indicate duration of time or in exchange for something, it is translated as "por." For example: "I will work for two hours" would be "Trabajaré por dos horas."